package com.zyj.springboot.dto;

import com.zyj.springboot.validators.PasswordEqual;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;
import org.omg.CosNaming.NamingContextExtPackage.StringNameHelper;

/**
 * @author : zhouyajun
 * @date : 2020-05-14
 */

@Builder
@Getter
@Setter
@PasswordEqual(min = 5, message = "密码和确认密码不一样")
public class UserDto {

    private int userId;

    @Length(min = 2, max = 10, message = "用户名长度必须在2-10的范围内")
    private String username;

    private String password;

    private String confirmPassword;
}
